#/usr/bin/python
# -*- coding: utf-8 -*-

import sys
sys.path.append('../../../icafe')
import parameters

class Property():
    
    def __init__(self,pid,section,material):
        
        self.UId = pid
        self.type = None
        self.material = material
        self.section = section       
    
    def getArgs(self):
        pass
        
class PropShell(Property):
    
    def __init__(self,pid,section,material,material_orientation=((1,0,0),(0,1,0),(0,0,1)),z1=None):
        
        Property.__init__(self,pid,section,material)
        self.type = "SHELL"
        self.material_orientation = material_orientation
        if z1 == None:
            self.z1 = -section.thickness/2
            self.z2 = section.thickness/2
        else:
            self.z1 = z1
            self.z2 = z1 + section.thickness
     
    def getArgs(self):
        pass   
        
class PropMemb(Property):
    
    def __init__(self,pid):
        
        Property.__init__(self,pid)
        self.type = "MEMBRANE"
        self.material_orientation = None
        
class PropBar(Property):
    
    def __init__(self,pid):
        
        Property.__init__(self,pid)
        self.type = "BAR"
        
class PropBeam(Property):
    
    def __init__(self,pid):
        
        Property.__init__(self,pid)
        self.type = "BEAM"
        self.section_orientation = [[],[]] # orientation of x-axis and y-axis of the section in local element or global frame
        self.material_orientation = None
#        self.frame = "LOCAL"
        
#    def set_frame_global(self):
#        if self.frame == "GLOBAL":
#            pass
#        else:
#            self.frame = "GLOBAL"
#    
#        return 0
#    
#    def set_frame_local(self):
#        self.frame = "LOCAL"

class PropVolum(Property):
    
    def __init__(self):
        
        Property.__init__(self) 
        self.type = "VOLUME"  

